package com.endoc.designpattern.bridge;

import com.endoc.designpattern.bridge.material.Material;
import com.endoc.designpattern.bridge.size.BagSize;

/**
 * 应用场景,采招袋子分为型号和材质方面,而型号又分为大中小特小等多个型号,材质也有很多种,如果单独为每个材质和材质配对,那么就会产生很多种,产生很多类
 * 采摘容器类
 */
public class BagAbstraction {
    Material material;//袋子材质类
    BagSize bagSize;//袋子大小类

    public Material getMaterial() {
        return material;
    }

    public void setMaterial(Material material) {
        this.material = material;
    }

    public BagSize getBagSize() {
        return bagSize;
    }

    public void setBagSize(BagSize bagSize) {
        this.bagSize = bagSize;
    }

    public void pick(){
        System.out.println("开始采摘");
    }
}
